package cn.edu.hyit.hjq.volunteems.backend.service.impl;

import cn.edu.hyit.hjq.volunteems.backend.mapper.SkillMapper;
import cn.edu.hyit.hjq.volunteems.backend.pojo.Skill;
import cn.edu.hyit.hjq.volunteems.backend.service.SkillService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SkillServiceImpl implements SkillService {

    private final SkillMapper skillMapper;

     public SkillServiceImpl(SkillMapper skillMapper) {
        this.skillMapper = skillMapper;
    }

    @Override
    public int insert(Skill skill) {
        return skillMapper.insert(skill);
    }

    @Override
    public int deleteById(Integer skillId) {
        return skillMapper.deleteById(skillId);
    }

    @Override
    public int update(Skill skill) {
        return skillMapper.update(skill);
    }

    @Override
    public Skill selectById(Integer skillId) {
        return skillMapper.selectById(skillId);
    }

    @Override
    public List<Skill> selectAll() {
        return skillMapper.selectAll();
    }
}
